package com.xhh.nphm.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xhh.nphm.system.domain.DeferAuto;
import com.xhh.nphm.system.mapper.DeferAutoDao;
import com.xhh.nphm.system.service.IDeferAutoService;
import org.springframework.stereotype.Service;

/**
 * @author zz
 */
@Service
public class IDeferAutoServiceImpl extends ServiceImpl<DeferAutoDao, DeferAuto> implements IDeferAutoService {

    /**
     * 通过部门编号查找自动延期配置
     *
     * @param deptId 部门编号
     * @return 自动延期配置信息
     */
    @Override
    public DeferAuto findByDeptId(String deptId) {
        QueryWrapper<DeferAuto> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("deptId",deptId);
        return getBaseMapper().selectOne(queryWrapper);
    }
}
